//添加属性类型
/* data": [
  {
    "attrName": "string",
    "attrValueList": [
      {
        "attrId": 0,
        "id": 0,
        "valueName": "string"
      }
    ],
    "categoryId": 0,
    "categoryLevel": 0,
  
  }
], */

//修改属性类型
/* data": [
  {
    "attrName": "string",
    "attrValueList": [
      {
        "attrId": 0,
        "id": 0,
        "valueName": "string"
      }
    ],
    "categoryId": 0,
    "categoryLevel": 0,
    "id": 0
  }
], */

//组件使用数据的类型 ---> AttrItem
/* {
  "attrName": "string",
  "attrValueList": [
    {
      "attrId": 0,
      "id": 0,
      "valueName": "string"
    }
  ],
} */

export interface AttrListParams {
  category1Id: number;
  category2Id: number;
  category3Id: number;
}
// export interface attrValueItem {
//   attrId: number;
//   id: number;
//   valueName: string;
// }
// export type attrValueList = attrValueItem[];

// export interface AttrItem {
//   attrName: string;
//   attrValueList: attrValueList;
//   categoryId: number;
//   categoryLevel: number;
//   id: number;
// }
// export type AttrList = AttrItem[];

// 定义组件使用数据类型

export interface AttrValueItem {
  valueName: string;
  id?: number;
  isEdit?: boolean;
}

export type AttrValueList = AttrValueItem[];

export interface AttrItem {
  id?: number;
  attrName: string;
  attrValueList: AttrValueList;
}

export type AttrList = AttrItem[];

//添加属性参数类型
export interface SaveAttrParams extends AttrItem {
  categoryId: number;
  categoryLevel: number;
}
//修改属性参数类型
// export interface UpdateAttrParams extends SaveAttrParams {
//   id: number;
// }
//获取属性列表返回值类型
export type GetAttrListResponse = SaveAttrParams[];
